package com.dotto.atos.services.errors;

@SuppressWarnings("serial")
public class UserServiceError extends Exception {

	public static final int USER_NAME_CODE_WRONG = 101;

	private int code;
	private String message;

	public UserServiceError(int code, String message) {
		super("Error Code : " + code + " Error Message : " + message);
		this.code = code;
		this.message = message;
	}

	public UserServiceError(int code) {
		super("Error Code : " + code);
		this.code = code;
		this.message = "Error Code : " + code;
	}

	public UserServiceError(int code, Throwable e) {
		super(e);
		this.code = code;
		this.message = e.getMessage();
	}

	public int getCode() {
		return code;
	}

	public String getMessage() {
		return message;
	}

}
